home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
sos3-2.lha
/
Makefile
< prev
Wrap
Makefile
|
1992-02-13
|
9KB
|
410 lines
# --------------------------------------------------------------------------
# Copyright 1992 by Forschungszentrum Informatik (FZI)
#
# You can use and distribute this software under the terms of the licence
# you should have received along with this program.
# If not or if you want additional information, write to
# Forschungszentrum Informatik, "STONE", Haid-und-Neu-Strasse 10-14,
# D-7500 Karlsruhe 1, Germany.
# --------------------------------------------------------------------------
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Makefile for SOS-Version SOS3-2 | 09-09-91 | Dietmar Theobald
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SOSPATH=__SOS_INSTALLED_PATH__
include $(SOSPATH)/commands.mk
include $(SOSPATH)/definitions.mk
# ~~~~~~~
default: all
LIB_RETAIN='(gsh_main.o|gsh_err.o|dir_main.o)'
clear_lib:
@ cd $(SOSLIB) ;\
files="`echo *.o | tr ' ' '\12' | egrep -v $(LIB_RETAIN)`" ;\
set -x ; rm -f $$files
# ~~~~~~~
INCLUDES = $(SOS_INCLUDES) -I$(TRC)
.SUFFIXES:
#
# definitions for module psm
#
USE_FCNTL=#-DLOCKD_CORRECT
#
# definitions for module cci
#
ECHOXX=TRUE
LDXX =/usr/local/lib/gcc-ld
CRTXX =/usr/local/lib/crt1+.o
LIBSXX=-lg++ /usr/local/lib/gcc-gnulib -lc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# main dependencies
# ('init' is excluded from 'all' since it is only needed during
# a bootstrap)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
all: lib compiler tools demos Xtools
lib: $(sos.a)
compiler: cfe genCC scp sil
boot_compiler: cfe genCC scp init
tools: dmp cnt
Xtools: dir gsh
demos: demo
init: $(SOSBIN)/init
cfe: $(SOSBIN)/cfe
genCC: $(SOSBIN)/genCC
scp: $(SOSBIN)/scp
sil: $(SOSBIN)/sil
dmp: $(SOSBIN)/dmp
gsh: $(SOSBIN)/gsh
dir: $(SOSBIN)/dir
cnt: $(SOSBIN)/cnt
demo: $(SOSBIN)/demo
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SOS library
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$(sos.o): $(sos.c)
$(COMP.CC) -I$(KNL) -I$(CCI) $(SOS)/sos.c
$(sos.a): $(sos.o) \
$(smg.o) \
$(psm.o) $(mon.o) $(psm_err.o) \
$(err.o) $(trc.o) \
$(agg_sos.o) $(Aggregate.o) $(Array.o) $(Association.o) \
$(Bag.o) $(Collection.o) $(List.o) \
$(Mapping.o) $(Set.o) $(agg_err.o) \
$(cci_sos.o) $(cci.o) $(cci_err.o) \
$(dir_sos.o) $(dir.o) $(dir_err.o) \
$(knl_sos.o) $(knl.o) $(knl_err.o) \
$(mta_sos.o) $(mta.o) $(mta_err.o)
ar rl $@ $? ;\
ranlib $@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# basic SOS modules
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~
# module: trc
# ~~~~~~~~~~~~~
$(trc.o): $(trc.c)
$(COMP.cc) $(TRC)/trc.c
# ~~~~~~~~~~~~~
# module: smg
# ~~~~~~~~~~~~~
$(smg.o): $(smg.c)
$(COMP.CC) $(SMG)/smg.c
# ~~~~~~~~~~~~~
# module: err
# ~~~~~~~~~~~~~
$(err.o): $(err.c)
$(COMP.CC) $(ERR)/err.c
# ~~~~~~~~~~~~~
# module: psm
# ~~~~~~~~~~~~~
$(psm.o): $(psm.c)
$(COMP.CC) $(USE_FCNTL) $(PSM)/psm.c
$(mon.o): $(mon.c)
$(COMP.CC) $(PSM)/mon.c
$(psm_err.o): $(psm_err.c)
$(COMP.CC) $(PSM)/psm_err.c
$(cnt_main.o): $(cnt_main.c)
$(COMP.CC) $(PSM)/cnt_main.c
$(SOSBIN)/cnt: $(cnt_main.o) $(sos.a)
$(LINK.CC) $(cnt_main.o) $(sos.a) $(LDFLAGS.s)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SOS core schemas
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~
# module: agg
# ~~~~~~~~~~~~~
$(AGG)/agg_sos.c $(AGG)/agg_use.h $(AGG)/agg_sos.h: $(AGG)/agg.sos
$(SOS.CMP) agg
$(agg_sos.o): $(agg_sos.c)
$(SOS.LARGEIF_CC) $(AGG)/agg_sos.c
$(Aggregate.o): $(Aggregate.c)
$(SOS.CC) $(AGG)/Aggregate.c
$(Array.o): $(Array.c)
$(SOS.CC) -I$(KNL) $(AGG)/Array.c
$(Association.o): $(Association.c)
$(SOS.CC) $(AGG)/Association.c
$(Bag.o): $(Bag.c)
$(SOS.CC) $(AGG)/Bag.c
$(Collection.o): $(Collection.c)
$(SOS.CC) $(AGG)/Collection.c
$(List.o): $(List.c)
$(SOS.CC) $(AGG)/List.c
$(Mapping.o): $(Mapping.c)
$(SOS.CC) $(AGG)/Mapping.c
$(Set.o): $(Set.c)
$(SOS.CC) $(AGG)/Set.c
$(agg_err.o): $(agg_err.c)
$(SOS.CC) -no_scp $(AGG)/agg_err.c
# ~~~~~~~~~~~~~
# module: knl
# ~~~~~~~~~~~~~
$(KNL)/knl_sos.c $(KNL)/knl_use.h $(KNL)/knl_sos.h: $(KNL)/knl.sos
$(SOS.CMP) knl
$(knl_sos.o): $(knl_sos.c)
$(SOS.IF_CC) $(KNL)/knl_sos.c
$(knl.o): $(knl.c)
$(SOS.CC) $(KNL)/knl.c
$(knl_err.o): $(knl_err.c)
$(SOS.CC) -no_scp $(KNL)/knl_err.c
# ~~~~~~~~~~~~~
# module: mta
# ~~~~~~~~~~~~~
$(MTA)/mta_sos.c $(MTA)/mta_use.h $(MTA)/mta_sos.h: $(MTA)/mta.sos
$(SOS.CMP) mta
$(mta_sos.o): $(mta_sos.c)
$(SOS.LARGEIF_CC) $(MTA)/mta_sos.c
$(mta.o): $(mta.c)
$(SOS.CC) $(MTA)/mta.c
$(mta_err.o): $(mta_err.c)
$(SOS.CC) -no_scp $(MTA)/mta_err.c
# ~~~~~~~~~~~~~
# module: dir
# ~~~~~~~~~~~~~
$(DIR)/dir_sos.c $(DIR)/dir_use.h $(DIR)/dir_sos.h: $(DIR)/dir.sos
$(SOS.CMP) dir
$(dir_sos.o): $(dir_sos.c)
$(SOS.IF_CC) $(DIR)/dir_sos.c
$(dir.o): $(dir.c)
$(SOS.CC) $(DIR)/dir.c
$(dir_err.o): $(dir_err.c)
$(SOS.CC) -no_scp $(DIR)/dir_err.c
$(dir_main.o): $(dir_main.c)
$(COMP.CC) $(DIR)/dir_main.c
$(SOSBIN)/dir: $(dir_main.o) $(dir.o) $(sos.a)
$(LINK.CC) $(dir_main.o) $(dir.o) $(trc.o) $(sos.a) $(XLIBS) $(LDFLAGS)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SOS compiler front end
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~
# module: cfe
# ~~~~~~~~~~~~~
$(CFE)/cfe_lex.h: $(CFE)/cfe.l
$(LEX.CC)
$(CFE)/cfe_yacc.c: $(CFE)/cfe.y
$(YACC.CC)
$(cfe.o): $(cfe.c)
$(COMP.CC) $(CFE)/cfe.c
$(cfe_yacc.o): $(cfe_yacc.c)
$(COMP.CC) $(CFE)/cfe_yacc.c
$(cfe_main.o): $(cfe_main.c)
$(COMP.CC) $(CFE)/cfe_main.c
$(cfe_err.o): $(cfe_err.c)
$(COMP.CC) $(CFE)/cfe_err.c
$(SOSBIN)/cfe: $(cfe_main.o) $(cfe.o) $(cfe_yacc.o) $(cfe_err.o) $(sos.a)
$(LINK.CC) $(cfe_main.o) $(cfe.o) $(cfe_yacc.o) $(cfe_err.o) $(sos.a) -ll $(LDFLAGS.s)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# host language C++: compiler back end & C++ implementation interface
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~
# module: genCC
# ~~~~~~~~~~~~~~~
$(genCC.o): $(genCC.c)
$(COMP.CC) $(GENCC)/genCC.c
$(genCC_main.o): $(genCC_main.c)
$(COMP.CC) $(GENCC)/genCC_main.c
$(genCC_err.o): $(genCC_err.c)
$(COMP.CC) $(GENCC)/genCC_err.c
$(SOSBIN)/genCC: $(genCC_main.o) $(genCC.o) $(genCC_err.o) $(sos.a)
$(LINK.CC) $(genCC_main.o) $(genCC.o) $(genCC_err.o) $(sos.a) $(LDFLAGS.s)
# ~~~~~~~~~~~~~
# module: cci
# ~~~~~~~~~~~~~
$(CCI)/cci_sos.c $(CCI)/cci_use.h $(CCI)/cci_sos.h: $(CCI)/cci.sos
$(SOS.CMP) cci
$(cci_sos.o): $(cci_sos.c)
$(SOS.IF_CC) $(CCI)/cci_sos.c
$(cci.o): $(cci.c)
$(SOS.CC) $(CCI)/cci.c '-DLDXX="$(LDXX)"' '-DCRTXX="$(CRTXX)"' \
'-DLIBSXX="$(LIBSXX)"' '-DECHOXX=$(ECHOXX)'
$(cci_err.o): $(cci_err.c)
$(SOS.CC) -no_scp $(CCI)/cci_err.c
$(sil_main.o): $(sil_main.c)
$(COMP.CC) $(CCI)/sil_main.c
$(SOSBIN)/sil: $(sil_main.o) $(sos.a)
$(LINK.CC) $(sil_main.o) $(sos.a) $(LDFLAGS)
# ~~~~~~~~~~~~~
# module: scp
# ~~~~~~~~~~~~~
$(SCP)/scp_lex.h: $(SCP)/scp.l
$(LEX.CC)
$(SCP)/scp_yacc.c: $(SCP)/scp.y
$(YACC.CC)
$(scp_yacc.o): $(scp_yacc.c)
$(COMP.CC) $(SCP)/scp_yacc.c
$(scp_main.o): $(scp_main.c)
$(COMP.CC) $(SCP)/scp_main.c
$(scp_err.o): $(scp_err.c)
$(COMP.CC) $(SCP)/scp_err.c
$(SOSBIN)/scp: $(scp_main.o) $(scp_yacc.o) $(scp_err.o) $(sos.a)
$(LINK.CC) $(scp_main.o) $(scp_yacc.o) $(scp_err.o) $(sos.a) -ll $(LDFLAGS.s)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SOS tools
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~
# module: dmp
# ~~~~~~~~~~~~~
$(dmp_main.o): $(dmp_main.c)
$(COMP.CC) $(DMP)/dmp_main.c
$(dmp_err.o): $(dmp_err.c)
$(COMP.CC) $(DMP)/dmp_err.c
$(SOSBIN)/dmp: $(dmp_main.o) $(dmp_err.o) $(sos.a)
$(LINK.CC) $(dmp_main.o) $(dmp_err.o) $(sos.a) $(LDFLAGS)
# ~~~~~~~~~~~~~
# module: gsh
# ~~~~~~~~~~~~~
$(gsh_main.o): $(gsh_main.c)
$(COMP.CC) $(GSH)/gsh_main.c
$(gsh_err.o): $(gsh_err.c)
$(COMP.CC) $(GSH)/gsh_err.c
$(SOSBIN)/gsh: $(gsh_main.o) $(gsh_err.o) $(sos.a)
$(LINK.CC) $(gsh_main.o) $(gsh_err.o) $(trc.o) $(sos.a) $(XLIBS) $(LDFLAGS)
# ~~~~~~~~~~~~~~
# module: init
# ~~~~~~~~~~~~~~
$(init_main.o): $(init_main.c)
$(COMP.CC) $(INIT)/init_main.c
$(SOSBIN)/init: $(init_main.o) $(sos.a)
$(LINK.CC) $(init_main.o) $(sos.a) $(LDFLAGS.s)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SOS demo programs
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~
# module: demo
# ~~~~~~~~~~~~~~
$(demo_main.o): $(demo_main.c)
$(COMP.CC) $(DEMO)/demo_main.c
$(SOSBIN)/demo: $(demo_main.o) $(sos.a)
$(LINK.CC) $(demo_main.o) $(sos.a) $(LDFLAGS.s)